<extend name="Public/base"/>
<block name="style">
	<link href="__PLUGINS__/select2/select2.css" rel="stylesheet" />
	<link href="__PLUGINS__/jquery-datatables-bs3/css/datatables.css" rel="stylesheet" />
	<script src="__JS__/common.js">
	</script>
</block>
<block name="page-header">
	<li><a href="U('Device/index')"><i class="fa fa-copy"></i>{$meta_title}</a></li>
	<li class="active"><i class="fa fa-font"></i>所有设备</li>
</block>
<block name="body">
<div class="row">
	<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
		<div class="panel panel-default bk-bg-white">
			<div class="panel-heading bk-bg-white">
				<h6><i class="fa fa-table red"></i><span class="break"></span>所有设备</h6>							
				<div class="panel-actions">
					<a href="#" class="btn-minimize"><i class="fa fa-caret-up"></i></a>
					<a href="#" class="btn-close"><i class="fa fa-times"></i></a>
				</div>
			</div>
			<div class="panel-body">
				<table class="table table-bordered table-striped mb-none datatable-tabletools">
					<thead>
					<tr>
						<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
						<th>编号</th>
						<th>OBD</th>
						<th>起始时间</th>
						<th>终止时间</th>
						<th>未行车天数</th>
						<th>类型</th>
						<th>升级状态</th>
						<th>升级</th>
						<th>操作</th>
					</tr>
					</thead>
					<tbody>
						<foreach name="allobd" item="dev" key="id">
						<tr class="gradeA mailbox">
			<td><input class="ids" type="checkbox" name="ids[]" value="{$vo.id}" /></td>
			<td>{$id+1}</td>
			<td><a class="text-success" href="{$dev.obdhref}">{$dev.obdid}</a></td>
			<td><span>{$dev.starttime}</span></td>
			<td><span>{$dev.stoptime}</span></td>
			<td><span>{$dev.nodrive} 天</span></td>
			<td class="mailbox-chat"><eq name="dev.type" value="1"><span class="ball green"></span>使用<else/><span class="ball dark"></span>测试</eq></td>
			<td class="mailbox-chat"><eq name="dev.updated" value="true"><span class="ball green"></span>已升级 <else/><span class="ball dark"></span>未升级 </eq></td>
			<td><a class="ajax-get text-success" href="{:U('Device/update?obdid='.$dev['obdid'].'&status='.$dev['updateable'])}"><eq name="dev.updateable" value="1">关闭<else/>开启</a></eq></a></td>
			<td><a href="#" class="text-success">编辑</a>
			<a href="#" class="text-success">禁用</a>
			<a href="#" class="text-success">删除</a></td>
			</tr>
		</foreach>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
</block>
<block name="script">
	<script src="__PLUGINS__/select2/select2.js"></script>
	<script src="__PLUGINS__/jquery-datatables/media/js/jquery.dataTables.js"></script>
	<script src="__PLUGINS__/jquery-datatables/extras/TableTools/js/dataTables.tableTools.min.js"></script>
	<script src="__PLUGINS__/jquery-datatables-bs3/js/datatables.js"></script>
	<script src="__JS__/pages/table-advanced.js"></script>
</block>